<form action="{:sysuri()}" method="post" data-auto="true" class="layui-form layui-card">

    <div class="layui-card-body padding-left-40">

<!--        <fieldset class="layui-form-item">-->
<!--            <legend>-->
<!--                <span class="layui-badge layui-bg-cyan">支付单证凭证</span>-->
<!--                <span class="layui-badge think-bg-blue">{$vo.order_no}</span>-->
<!--                <span class="layui-badge think-bg-violet">订单需要支付 {$vo.amount_real+0} 元</span>-->
<!--            </legend>-->
<!--            <div class="layui-form-item relative block">-->
<!--                <img alt="img" data-tips-image src="{$vo.payment_image|default=''}" style="width:auto;height:220px">-->
<!--            </div>-->
<!--        </fieldset>-->
        <label class="layui-form-item">
            <span class="help-label"><b>公证类型</b></span>
            <input class="layui-input" value='{$matter.type_text|default=""}-
{if $vo.base_type != 0}
{if $vo.matter_id == 1}
本人办理
                {else}
代理人办理
                {/if}
            {else}
{$matter.matter_name|default=""}
            {/if}
            ' readonly>
        </label>
        <div class="layui-form-item">
            <span class="help-label"><b>{if $vo.matter_id == '1' and $vo.base_type != '0'}委托人信息{else}代理人+委托人信息{/if}</b></span>
            <table class="layui-table">
                <thead>
                <tr>
                    <th class="nowrap text-center">姓名</th>
                    <th class="nowrap text-center">联系电话</th>
                    <th class="nowrap text-center">{if $vo.base_type == '0'}委托人{else}{if $vo.matter_id eq '1'}委托人{else}代理人{/if}{/if}身份证正面</th>
                    <th class="nowrap text-center">{if $vo.base_type == '0'}委托人{else}{if $vo.matter_id eq '1'}委托人{else}代理人{/if}{/if}身份证反面</th>
                    <th class="nowrap text-center">委托人户口本图片</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-if="item.city.length > 0" ng-repeat="item in rules">
                    <td class="padding-0 text-center">
                        <input class="layui-input text-center padding-left-0 border-0" required value='{$vo.client_name}' readonly>
                    </td>
                    <td class="padding-0 text-center">
                        <input class="layui-input text-center padding-left-0 border-0" required value='{$vo.client_phone}' readonly>
                    </td>
                    <td class="padding-0 text-center">
                        <div class="headimg headimg-md" data-tips-hover data-tips-image data-lazy-src="{$vo.client_front_of_id_card|default='__ROOT__/static/theme/img/headimg.png'}"></div>
                    </td>
                    <td class="padding-0 text-center">
                        <div class="headimg headimg-md" data-tips-hover data-tips-image data-lazy-src="{$vo.client_reverse_side_of_id_card|default='__ROOT__/static/theme/img/headimg.png'}"></div>
                    </td>
                    <td class="padding-0 text-center">
                        <div class="headimg headimg-md" data-tips-hover data-tips-image data-lazy-src="{$vo.client_household_register|default='__ROOT__/static/theme/img/headimg.png'}"></div>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
        {eq name='$vo.base_type' value='2'}
        <span class="help-label"><b>关系证明</b></span>
        <fieldset class="layui-form-item">
            <div class="layui-form-item relative block">
                {if $vo.proof_of_relationship != ''}
                <img alt="img" data-tips-image src="{$vo.proof_of_relationship|default=''}" style="width:auto;height:100px">
                {/if}
            </div>
        </fieldset>
        {/eq}
        <div class="layui-form-item">
            <span class="help-label"><b>{in name='$vo.base_type' value='1,2'}父母婚姻状况{else/}婚姻状况{/in}</b></span>
            <table class="layui-table">
                <thead>
                <tr>
                    <th class="nowrap text-center">婚姻状况</th>
                    {eq name='vo.client_marital_status' value='1'}
                    <th class="nowrap text-center">结婚证</th>
                    {/eq}
                    {eq name='vo.client_marital_status' value='2'}
                    <th class="nowrap text-center">离婚证</th>
                    <th class="nowrap text-center">离婚协议</th>
                    {/eq}
                </tr>
                </thead>
                <tbody>
                <tr ng-if="item.city.length > 0" ng-repeat="item in rules">
                    <td class="padding-0 text-center">
                        <input class="layui-input text-center padding-left-0 border-0" required value='{switch vo.client_marital_status}
                        {case 0}未婚{/case}
                        {case 1}已婚{/case}
                        {default /}离异
                        {/switch}' readonly>
                    </td>
                    {eq name='vo.client_marital_status' value='1'}
                    <td class="padding-0 text-center">
                        <div class="headimg headimg-md" data-tips-hover data-tips-image data-lazy-src="{$vo.client_marriage_certificate|default='__ROOT__/static/theme/img/headimg.png'}"></div>
                    </td>
                    {/eq}
                    {eq name='vo.client_marital_status' value='2'}
                    <td class="padding-0 text-center">
                        <div class="headimg headimg-md" data-tips-hover data-tips-image data-lazy-src="{$vo.client_divorce_certificate|default='__ROOT__/static/theme/img/headimg.png'}"></div>
                    </td>
                    <td class="padding-0 text-center">
                        {foreach $vo.client_divorce_agreement as $client_divorce_agreement}
                        <div class="headimg headimg-md" data-tips-hover data-tips-image data-lazy-src="{$client_divorce_agreement|default='__ROOT__/static/theme/img/headimg.png'}"></div>
                        {/foreach}
                    </td>
                    {/eq}
                </tr>
                </tbody>
            </table>
        </div>
        {eq name='$vo.base_type' value='0'}
        <span class="help-label"><b>房产证</b></span>
        <fieldset class="layui-form-item">
            <div class="layui-form-item relative block">
                {if $vo.client_property_ownership_certificate != ''}
                <img alt="img" data-tips-image src="{$vo.client_property_ownership_certificate|default=''}" style="width:auto;height:100px">
                {/if}
            </div>
        </fieldset>
        <span class="help-label"><b>购房协议</b></span>
        <fieldset class="layui-form-item">
            <div class="layui-form-item relative block">
                {foreach $vo.client_property_information as $k=>$v}
                {if $v != ''}
                <img alt="img" data-tips-image src="{$v|default=''}" style="width:auto;height:100px">
                {/if}
                {/foreach}
            </div>
        </fieldset>
        <span class="help-label"><b>房产信息查询(产调)</b></span>
        <fieldset class="layui-form-item">
            <div class="layui-form-item relative block">
                {foreach $vo.client_property_information as $k=>$v}
                {if $v != ''}
                <img alt="img" data-tips-image src="{$v|default=''}" style="width:auto;height:100px">
                {/if}
                {/foreach}
            </div>
        </fieldset>
        <span class="help-label"><b>受托人</b></span>
        <fieldset class="layui-form-item">
            <div class="layui-form-item relative block">
                {foreach $vo.trustee_id_card as $k=>$v}
                <img alt="img" data-tips-image src="{$v.idCard_z|default=''}" style="width:auto;height:100px">
                <img alt="img" data-tips-image src="{$v.idCard_f|default=''}" style="width:auto;height:100px">
                {/foreach}
            </div>
        </fieldset>
        {/eq}
        {in name='$vo.base_type' value='1,2'}
        <div class="layui-form-item">
            <span class="help-label"><b>父母身份证</b></span>
            <table class="layui-table">
                <thead>
                <tr>
                    <th class="nowrap text-center">父亲身份证正面</th>
                    <th class="nowrap text-center">父亲身份证反面</th>
                    <th class="nowrap text-center">母亲身份证正面</th>
                    <th class="nowrap text-center">母亲身份证反面</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-if="item.city.length > 0" ng-repeat="item in rules">
                    <td class="padding-0 text-center">
                        <div class="headimg headimg-md" data-tips-hover data-tips-image data-lazy-src="{$vo.front_of_fathers_id_card|default='__ROOT__/static/theme/img/headimg.png'}"></div>
                    </td>
                    <td class="padding-0 text-center">
                        <div class="headimg headimg-md" data-tips-hover data-tips-image data-lazy-src="{$vo.reverse_side_of_fathers_id_card|default='__ROOT__/static/theme/img/headimg.png'}"></div>
                    </td>
                    <td class="padding-0 text-center">
                        <div class="headimg headimg-md" data-tips-hover data-tips-image data-lazy-src="{$vo.front_of_mothers_id_card|default='__ROOT__/static/theme/img/headimg.png'}"></div>
                    </td>
                    <td class="padding-0 text-center">
                        <div class="headimg headimg-md" data-tips-hover data-tips-image data-lazy-src="{$vo.reverse_side_of_mothers_id_card|default='__ROOT__/static/theme/img/headimg.png'}"></div>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
        <span class="help-label"><b>父母户口本</b></span>
        <fieldset class="layui-form-item">
            <div class="layui-form-item relative block">
                {if $vo.parents_household_register != ''}
                <img alt="img" data-tips-image src="{$vo.parents_household_register|default=''}" style="width:auto;height:100px">
                {/if}
            </div>
        </fieldset>
        {/in}
        <span class="help-label"><b>其他</b></span>
        <fieldset class="layui-form-item">
            <div class="layui-form-item relative block">
                {foreach $vo.other as $k=>$v}
                {if $v != ''}
                <img alt="img" data-tips-image src="{$v|default=''}" style="width:auto;height:100px;margin-left: 2px;">
                {/if}
                {/foreach}
            </div>
        </fieldset>
        <div class="layui-form-item">
            <span class="color-green font-w7 label-required-prev">审核操作类型</span>
            <span class="color-desc margin-left-5">Audit type</span>
            <div class="layui-textarea" style="min-height:auto;padding:10px 0 13px 18px">
                {php} $status = 1; {/php}
                {foreach [1 => '通过', 0 => '驳回'] as $k => $v}
                {if $k eq $status}
                <input checked name="status" title="{$v}" lay-filter="status" type="radio" value='{$k}'>
                {else}
                <input name="status" title="{$v}" lay-filter="status" type="radio" value='{$k}'>
                {/if}{/foreach}
            </div>
        </div>

        {if $vo.status == 5}
        <label class="layui-form-item relative block">
            <span class="help-label"><b>审批人</b></span>
            <input class="layui-input" name="approval_name" placeholder="请输入审批人名字" required value='{$vo.approval_name|default=""}'>
        </label>
        {/if}

        {if $vo.status == 1}
        <div class="layui-form-item video_forensics_div">
            <span class="color-green font-w7">视频取证</span>
            <div class="layui-input-block" style='margin-left: 0;'>
                <div class="layui-form-item">
                  <input type="checkbox" name="video_forensics" lay-skin="switch" lay-text="开启|关闭" checked value="1">
                </div>
            </div>
        </div>
        {/if}
        {if $vo.status == 1 and $vo.base_type == 0}
        <div class="layui-form-item proxy_statement_div">
            <span class="color-green font-w7 label-required-prev">委托书</span>
            <span class="color-desc margin-left-5"></span>
            <table class="layui-table">
                <thead>
                <tr>
                    <th class="text-center" style="width:90px">委托书</th>
                </tr>
                <tr>
                    <th>
                        <div class="relative block">
                            <textarea class="layui-hide" name="proxy_statement" placeholder="请输入委托书">{$vo.proxy_statement|default=''}</textarea>
                        </div>
                    </th>
                </tr>
                </thead>
            </table>
        </div>
        {/if}
        {if $vo.status == 1}
        <div class="layui-form-item read_agreement_div">
            <span class="color-green font-w7 label-required-prev">阅读协议</span>
            <span class="color-desc margin-left-5"></span>
            <table class="layui-table">
                <thead>
                <tr>
                    <th class="text-center" style="width:90px">送达回证</th>
                </tr>
                <tr>
                    <th>
                        <div class="relative block">
                            <textarea class="layui-hide" name="read_agreement1" placeholder="请输入送达回证">{$vo.read_agreement1|default=''}</textarea>
                        </div>
                    </th>
                </tr>
                <tr>
                    <th class="text-center" style="width:90px">询问记录</th>
                </tr>
                <tr>
                    <th>
                        <div class="relative block">
                            <textarea class="layui-hide" name="read_agreement2" placeholder="请输入询问记录">{$vo.read_agreement2|default=''}</textarea>
                        </div>
                    </th>
                </tr>
                <tr>
                    <th class="text-center" style="width:90px">涉外民事类公证告知书</th>
                </tr>
                <tr>
                    <th>
                        <div class="relative block">
                            <textarea class="layui-hide" name="read_agreement3" placeholder="请输入涉外民事类公证告知书">{$vo.read_agreement3|default=''}</textarea>
                        </div>
                    </th>
                </tr>
                <tr>
                    <th class="text-center" style="width:90px">公证受理通知单回执</th>
                </tr>
                <tr>
                    <th>
                        <div class="relative block">
                            <textarea class="layui-hide" name="read_agreement4" placeholder="请输入公证受理通知单回执">{$vo.read_agreement4|default=''}</textarea>
                        </div>
                    </th>
                </tr>
                <tr>
                    <th class="text-center" style="width:90px">公证处公证申请表</th>
                </tr>
                <tr>
                    <th>
                        <div class="relative block">
                            <textarea class="layui-hide" name="read_agreement5" placeholder="请输入公证处公证申请表">{$vo.read_agreement5|default=''}</textarea>
                        </div>
                    </th>
                </tr>



                </thead>
            </table>
        </div>
        {/if}


        <!--审批证书-->
        {if $vo.status==7}
        <div class="layui-form-item" id="operation_step">
            <span class="color-green font-w7 label-required-prev">操作步骤</span>
            <span class="color-desc margin-left-5"></span>
            <div class="layui-textarea" style="min-height:auto;padding:10px 0 13px 18px">
                {php} $status = 0; {/php}
                {foreach [0 => '信息待确认', 1 => '认证审核中'] as $k => $v}
                {if $k eq $status}
                <input checked name="step" title="{$v}" type="radio" value='{$k}'>
                {else}
                <input name="step" title="{$v}" type="radio" value='{$k}'>
                {/if}{/foreach}
            </div>
        </div>
        {/if}
        <label class="layui-form-item relative block">
            <span class="color-green font-w7">订单审核描述</span>
            <span class="color-desc margin-left-5"></span>
            <textarea class="layui-textarea" name="reason_for_rejection" placeholder="请输入订单审核描述">{$vo.reason_for_rejection|default=''}</textarea>
        </label>

        <div class="hr-line-dashed"></div>
        {notempty name='vo.id'}<input name='id' type='hidden' value='{$vo.id}'>{/notempty}
        {notempty name='vo.base_type'}<input name='base_type' type='hidden' value='{$vo.base_type}'>{/notempty}
        {notempty name='vo.order_no'}<input name='order_no' type='hidden' value='{$vo.order_no}'>{/notempty}
        <input name='type' type='hidden' value='{$type}'>
        <div class="layui-form-item text-center">
            <button class="layui-btn" type='submit'>审核</button>
            <button class="layui-btn layui-btn-danger" data-close data-confirm="确定要取消吗？" type='button'>取消</button>
        </div>
    </div>
</form>
<script>
    layui.use(['form'], function(){
        var form = layui.form;
        form.on("radio(status)", function (data) {
            var status = data.value;
            if (this.value == '0') {
                $("#operation_step").show();
                $(".video_forensics_div,.proxy_statement_div,.read_agreement_div").hide()

            } else if (this.value == '1') {
                $("#operation_step").hide();
                $(".video_forensics_div,.proxy_statement_div,.read_agreement_div").show()

            }
        });
        layui.form.render();
        $("input[name='status']:checked").next('.layui-form-radio').trigger("click");
    });

    require(['ckeditor'], function () {
        window.createEditor('[name=proxy_statement]', {height: 350})
        window.createEditor('[name=read_agreement1]', {height: 350})
        window.createEditor('[name=read_agreement2]', {height: 350})
        window.createEditor('[name=read_agreement3]', {height: 350})
        window.createEditor('[name=read_agreement4]', {height: 350})
        window.createEditor('[name=read_agreement5]', {height: 350})
    });


</script>